import re


# using regular expression to judge the phone number

def isPhoneNumber(num: str) -> bool:
    """
    using regular expression to judge the number phone

    :param num: phone number
    :return: return true if number matches the rules; otherwise return false.
    """
    # step1: create a regex in a format.
    phone_number_regex = re.compile(r'\d\d\d-\d\d\d-\d\d\d\d')
    # step2: entity matching regex; if the search is successful, it returns a string.
    result = phone_number_regex.search('My phone number is 4414-555-0192')
    print("The result is ", result)
    return True


if __name__ == '__main__':
    isPhoneNumber("1111-111-4231")
